package com.mk.admin.controller;

import com.mk.admin.log.WriteLog;
import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.DoctorScienceInfoQuery;
import com.mk.admin.model.vo.DoctorScienceInfoVo;
import com.mk.admin.model.vo.NoticeVo;
import com.mk.admin.service.DoctorScienceInfoService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "医生科普信息")
@RequestMapping("/a/adm/doctorScienceInfo")
public class DoctorScienceInfoController {
    @Autowired
    private DoctorScienceInfoService doctorScienceInfoService;

    @PostMapping("/select")
    @WriteLog("医生科普信息查询")
    public ResultDto select(@RequestBody DoctorScienceInfoQuery query) {
        return doctorScienceInfoService.select(query);
    }

    @PostMapping("/add")
    @WriteLog("医生科普信息新增")
    public ResultDto add(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.add(vo);
    }

    @PostMapping("/update")
    @WriteLog("医生科普信息修改")
    public ResultDto update(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.update(vo);
    }

    @PostMapping("/delete")
    @WriteLog("医生科普信息删除")
    public ResultDto delete(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.delete(vo.getId());
    }

    @PostMapping("/status")
    @WriteLog("医生科普信息状态")
    public ResultDto status(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.status(vo.getId());
    }

    @PostMapping("/times")
    public ResultDto times(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.times(vo);
    }

    @PostMapping("/likes")
    @WriteLog("点赞")
    public ResultDto likes(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.likes(vo);
    }

    @PostMapping("/collects")
    @WriteLog("收藏")
    public ResultDto collects(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.collects(vo);
    }

    @PostMapping("/forwards")
    @WriteLog("收藏")
    public ResultDto forwards(@RequestBody DoctorScienceInfoVo vo) {
        return doctorScienceInfoService.forwards(vo);
    }

}
